from pydantic_settings import BaseSettings

class Settings(BaseSettings):
    
    REDIS_HOST: str = "43.142.176.219"
    REDIS_PORT: int = 6379
    REDIS_PASSWORD: str = "123456"
    REDIS_DB: int = 0
    REDIS_MAX_CONNECTIONS: int = 10
    
    MYSQL_HOST: str = "43.142.176.219"
    MYSQL_PORT: int = 3306
    MYSQL_USER: str = "root"
    MYSQL_PASSWORD: str = "123456"
    MYSQL_DATABASE: str = "teach"
    MYSQL_CHARSET: str = "utf8mb4"
    
    APP_NAME: str = "AI教学中心"
    DEBUG: bool = True
    
    JWT_SECRET_KEY: str = "secret"
    JWT_ALGORITHM: str = "HS256"
    JWT_EXPIRE_MINUTES: int = 60 * 24 * 7
    JWT_LOGIN_SUBJECT: str = "login"
    
    
    LLM_MODEL: str = "qwen-plus"
    LLM_BASE_URL: str = "https://dashscope.aliyuncs.com/compatible-mode/v1"
    LLM_API_KEY: str = "sk-c008d4e5856c4258b6f0aa1c3c7de025"
    LLM_TEMPERATURE: float = 0.7
    LLM_STREAMING: bool = True

    EMBEDDING_MODEL: str = "text-embedding-v4"



    MILVUS_URL:str  = "http://43.142.176.219:19530"
    
    class Config:
        env_file = ".env"
        case_sensitive = True
    
    
settings = Settings()